﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProcessingFS;

namespace CSharpSample
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            var pApp = new Sample();
            pApp.Show();
        }
    }

    class Sample:PApp
    {
        private int currentX;
        private int currentY;
        public override void Setup()
        {
            Background(255);
            Size(600, 600);
            Fill(255);
            RectMode(DrawModes.Center);
        }

        public override void Draw()
        {
            currentX = currentX + ((MouseX - currentX)/10);
            currentY = currentY + ((MouseY - currentY)/10);
            Ellipse(currentX, currentY, 50, 50);
        }

        public override void MousePressed()
        {
            Background(255);
        }
    }
}
